package com.example.lhh.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author luoHongHu
 * @Description 统一返回工具类
 * @date 2025年03月29日 17:46
 */

@Data
public class LhhResponseJson<T> {
    //状态码
    private String status;
    //成功标识
    private boolean success;
    //消息
    private String message;
    //返回的数据
    private T data;

    public LhhResponseJson() {}

    public LhhResponseJson(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public LhhResponseJson(String status, boolean success, String message) {
        this.status = status;
        this.success = success;
        this.message = message;
    }

    public LhhResponseJson(String status, boolean success, T data) {
        this.status = status;
        this.success = success;
        this.data = data;
    }

    public LhhResponseJson(String status, boolean success, String message, T data) {
        this.status = status;
        this.success = success;
        this.message = message;
        this.data = data;
    }
}
